package com.commerceE.common.search;

import java.util.List;

public class ProductCriterion {
	
	
	private String condition;
	
	private Object value;
	
	private BetweenPair pairValue;
	
	private List<BetweenPair> pairValueList;
	
	private boolean valueListFlag = false;
	
	private boolean betweenValueFlag= false;
	
	private boolean betweenListValueFlag= false;
	
	private boolean singleFlag= false;
	
	private String operation = "=";

	private boolean validOfValueList ;
	
//	private Object[] betweenValues = new Object[2];
	
	
	public ProductCriterion(String condition, Object value) {
		this.condition = condition;
		this.value = value;
		this.operation = "=";
	}
	
	public ProductCriterion(String condition,BetweenPair pairValue,boolean flag) {
		this.condition = condition;
		this.pairValue = pairValue;
		this.operation = "=";
		this.betweenValueFlag = true;
	}
	
	public ProductCriterion(String condition,List<BetweenPair> pairValueList,boolean flag) {
		this.condition = condition;
		this.pairValueList = pairValueList;
		this.operation = "=";
		this.betweenListValueFlag = true;
	}
	
//	public ProductCriterion(String condition, Object[] betweenValues) {
//		this.condition = condition;
//		this.betweenValues = betweenValues;
//		this.operation = "=";
//	}
//	
//	public ProductCriterion(String condition, List<Object> valueList, boolean valueListFlag) {
//		this.condition = condition;
//		this.value = null;
//		this.operation = "=";
//	}
	
//	public ProductCriterion(String condition, Object value, List<Object> valueList,
//			boolean isValueList, String operation) {
//		this.condition = condition;
//		this.value = value;
//		this.valueList = valueList;
//		this.valueListFlag = isValueList;
//		this.operation = operation;
//	}
	
	
	public boolean isValidOfValueList() {
		return valueListFlag;
	}

	public BetweenPair getPairValue() {
		return pairValue;
	}

	public void setPairValue(BetweenPair pairValue) {
		this.pairValue = pairValue;
	}

	public List<BetweenPair> getPairValueList() {
		return pairValueList;
	}

	public void setPairValueList(List<BetweenPair> pairValueList) {
		this.pairValueList = pairValueList;
	}

	public boolean isBetweenValueFlag() {
		return betweenValueFlag;
	}

	public void setBetweenValueFlag(boolean betweenValueFlag) {
		this.betweenValueFlag = betweenValueFlag;
	}

	public boolean isBetweenListValueFlag() {
		return betweenListValueFlag;
	}

	public void setBetweenListValueFlag(boolean betweenListValueFlag) {
		this.betweenListValueFlag = betweenListValueFlag;
	}

	public boolean isSingleFlag() {
		return singleFlag;
	}

	public void setSingleFlag(boolean singleFlag) {
		this.singleFlag = singleFlag;
	}

//	public Object[] getBetweenValues() {
//		return betweenValues;
//	}
//
//	public void setBetweenValues(Object[] betweenValues) {
//		this.betweenValues = betweenValues;
//	}

	public void setValidOfValueList(boolean validOfValueList) {
		this.validOfValueList = validOfValueList;
	}

	public String getCondition() {
		return condition;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	public Object getValue() {
		return value;
	}

	public void setValue(Object value) {
		this.value = value;
	}

	public boolean isValueListFlag() {
		return valueListFlag;
	}

	public void setValueListFlag(boolean valueListFlag) {
		this.valueListFlag = valueListFlag;
	}

	public String getOperation() {
		return operation;
	}

	public void setOperation(String operation) {
		this.operation = operation;
	}
	
	

}


